New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix issues with sticky quick toolbar positioning #2834
Conversation
@@ -146,6 +146,10 @@ | |||
display: block; | |||
} | |||
|
|||
.freeform-toolbar.has-advanced-toolbar { | |||
margin-top: -85px; /* Pull upwards the classic text toolbar when enabled */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it always 85 pixels? I guess the advanced toolbar could have several rows?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Solid observation, and good point. I don't know what we can do to fix this — I know it seems hacky, but unless we have some way to calculate the height of the fully expanded toolbar, I can't think of a way to "work perfectly" in every toolbar situation. Especially since responsiveness is going to introduce still more issues.
That said, the above seems to work fairly well considering you have three toolbars. All content is editable, all content is visible, and there is room for the toolbars. Since one key philosophy is that unselected block is preview and selected block/edit mode can show more options, although not optimal this doesn't fall outside of the principles.
Since Gutenberg comes with up to two toolbars by default, I feel like this is a decent compromise, especially since three stacked toolbars is an editor design I don't think is very good in the first place, but there for back compat purposes.
What do you think, @karmatosed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, good points, I'm ok with this tradeoff
👍 to getting this in. I feel that it's better than what we have right now and that's the important thing. It also makes the toolbar seem less annoying to me, which is a good thing as reported by users. |
This PR improves the positioning of the sticky toolbar in normal blocks and the Classic Text blocks, which regressed when the general layout was refactored to have multiple scrollable areas.
Additionally, this PR fixes #1983 by pushing the Classic Text toolbar upwards when the kitchen sink is enabled: